/* 不良品管理页面样式 */

/* 图片上传组件样式 */
.layui-upload-area {
    width: 200px;
    height: 200px;
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.layui-upload-area:hover {
    border-color: #1E9FFF;
    background-color: #f0f9ff;
}

.layui-upload-area:active {
    border-color: #0d8aff;
    background-color: #e6f3ff;
}

.layui-upload-preview {
    position: relative;
    display: inline-block;
}

.layui-upload-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background-color: #ff5722;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 1000;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.layui-upload-remove:hover {
    background-color: #ff4444;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.4);
}

.layui-upload-remove:active {
    transform: scale(0.95);
}

.layui-upload-remove:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.3);
}

/* 拖拽状态样式 */
.layui-upload-area.dragover {
    border-color: #5FB878;
    background-color: #f0f9f0;
    transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .layui-upload-area {
        width: 150px;
        height: 150px;
    }
    
    .layui-upload-area .layui-icon {
        font-size: 36px !important;
    }
    
    .layui-upload-area p {
        font-size: 12px !important;
        margin-top: 8px !important;
    }
}

/* 附件上传组件样式 */
.attachment-area {
    width: 200px;
    height: 120px;
}

.layui-upload-file-info {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #e6e6e6;
    min-width: 200px;
    position: relative;
}

.layui-upload-file-info .layui-icon {
    font-size: 24px;
    color: #1E9FFF;
    margin-right: 10px;
}

.layui-upload-file-info .file-name {
    flex: 1;
    color: #333;
    font-size: 14px;
    word-break: break-all;
}

/* 附件上传组件的拖拽状态 */
.attachment-area.dragover {
    border-color: #1E9FFF;
    background-color: #f0f9ff;
    transform: scale(1.02);
}

/* 创建人字段样式 */
#editCreatorName {
    background-color: #f8f8f8 !important;
    color: #666 !important;
    cursor: not-allowed;
}

#editCreatorName:focus {
    border-color: #d9d9d9 !important;
    box-shadow: none !important;
}

/* 删除按钮样式 */
#deleteBtn {
    background-color: #FF5722 !important;
    color: white !important;
    border: none !important;
}

#deleteBtn:hover {
    background-color: #E64A19 !important;
}

#deleteBtn:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
}

#defectiveTable {
    width: 100%;
    min-width: 1200px;
    table-layout: auto;
}

#defectiveTable th,
#defectiveTable td {
    padding: 8px 12px;
    word-wrap: break-word;
}

/* 复选框列 */
#defectiveTable th:nth-child(1),
#defectiveTable td:nth-child(1) {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
}

/* 不良品项编号列 */
#defectiveTable th:nth-child(2),
#defectiveTable td:nth-child(2) {
    width: 180px;
    min-width: 150px;
}

/* 不良品项名称列 */
#defectiveTable th:nth-child(3),
#defectiveTable td:nth-child(3) {
    width: 220px;
    min-width: 180px;
}

/* 附件列 */
#defectiveTable th:nth-child(4),
#defectiveTable td:nth-child(4) {
    width: 120px;
    min-width: 100px;
}

/* 图片列 */
#defectiveTable th:nth-child(5),
#defectiveTable td:nth-child(5) {
    width: 100px;
    min-width: 80px;
}

/* 创建时间列 */
#defectiveTable th:nth-child(6),
#defectiveTable td:nth-child(6) {
    width: 160px;
    min-width: 140px;
}

/* 创建人列 */
#defectiveTable th:nth-child(7),
#defectiveTable td:nth-child(7) {
    width: 120px;
    min-width: 100px;
}

/* 修改人列 */
#defectiveTable th:nth-child(8),
#defectiveTable td:nth-child(8) {
    width: 120px;
    min-width: 100px;
}

#defectiveTable input.layui-input {
    padding: 2px 4px !important;
}
